/*
 * @Author: HeAo
 * @Date: 2021-11-04 16:03:38
 * @LastEditTime: 2021-11-04 16:12:48
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \web2103-2105\web2105\4-1-Nodejs\day05\briup-sc\utils\Connection.js
 * 别乱动！
 */
// 导入数据库
const mysql = require('mysql');

// 1.创建数据库连接池
// const connection = mysql.createConnection({
//   host: 'localhost',
//   user: 'briup',
//   password: 'briupSH',
//   database: 'briup-sc-05'
// })
const pool = mysql.createPool({
  connectionLimit: 10,
  host: 'localhost',
  user: 'briup',
  password: 'briupSH',
  database: 'briup-sc-05'
})
// 2.开启连接
// connection.connect()

// module.exports = connection
module.exports = pool
